package fr.generali.sas.dao;

import com.google.common.base.Function;

import fr.generali.sas.domain.Flux;


/**
 * Mapping entre FluxHibernate et Flux (xml)
 *
 */
public class FluxFunction implements Function<Flux, fr.generali.sas.model.v1_0.Flux> {

	public fr.generali.sas.model.v1_0.Flux apply(Flux fluxHibernate) {
		fr.generali.sas.model.v1_0.Flux f = new fr.generali.sas.model.v1_0.Flux();
		f.setContent(fluxHibernate.getContent());
		f.setId(String.valueOf(fluxHibernate.getId()));
		f.setIdClient(fluxHibernate.getIdClient());
		f.setTimestamp(fluxHibernate.getDateInsertion());
		f.setTypeFlux(fluxHibernate.getTypeFlux());
		return f;
	}

}
